/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { responseSuccess } from '../utils';
import Mock from 'mockjs';
const { mock } = Mock;

export default {
  'POST /FianceTransfer/cdFinanceAccount': (req: Request, res: Response) => {
    res.send(
      mock({
        code: '0',
        msg: 'success',
        data: {
          'avail_money|1-100.1-10': 1,
          'cash_money|1-100.1-10': 1,
        },
      }),
    );
  },
  'POST /FianceTransfer/cdFinanceOperateAccount': (req: Request, res: Response) =>
    responseSuccess(req, res),
  'POST /FianceTransfer/handQuery': (req: Request, res: Response) => {
    res.send(
      mock({
        code: '0',
        msg: 'success',
        data: {
          'out|1-3': [
            {
              wduser_id: '825912',
              home_shop_id: '0',
              order_number: 'h627bbd6ee655c',
              outcome_type: 'hand_out1',
              money: '15.00',
              success_time: '2022-12-30 21:43:11',
              desc: '手动调整',
              type_desc: '可消费账户扣费',
              phone: '18516106638',
            },
          ],
          'in|1-3': [
            {
              wduser_id: '825912',
              home_shop_id: '0',
              order_number: 'h627bbd6ee655c',
              outcome_type: 'hand_out1',
              money: '15.00',
              success_time: '2022-12-30 21:43:11',
              desc: '手动调整',
              type_desc: '可消费账户扣费',
              phone: '18516106638',
            },
          ],
        },
      }),
    );
  },
  'POST /FianceTransfer/cdOperateReasonList': (req: Request, res: Response) => {
    res.send(
      mock({
        code: '0',
        msg: 'success',
        data: {
          delete: '删选',
          refund: '订单退款',
        },
      }),
    );
  },
  'POST /FianceTransfer/userTypeMap': (req: Request, res: Response) => {
    res.send(
      mock({
        code: '0',
        msg: 'success',
        data: {
          cd: '聚单客',
          cdadmin: '聚单客加盟商',
          cdopen: '聚单客开放平台',
        },
      }),
    );
  },
};
